home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / MWSTAR.ZIP / STARNOKB.ASM < prev    next >
Encoding:
Assembly Source File  |  1996-09-07  |  714 b   |  34 lines

  1. ;       Matt Wilhelm's Small Starfield Entry
  2.  
  3. .model tiny
  4.  
  5. .code
  6. org 100h
  7.  
  8. start:
  9.         mov     al,13h
  10.         int     10h
  11.  
  12.         mov     bh,0a0h
  13.         mov     es,bx
  14.  
  15. ;        dec     ch             ; for many stars
  16. genstar:
  17.         in      al,40h          ; pop ax works (but sucks)
  18.                                 ; inc ax works, and looks nice
  19.                                 ; (but loses randomness)
  20.         aaa
  21.  
  22. scroll:
  23.         sbb     di,ax
  24.         stosb
  25.         loop    genstar
  26.  
  27.         xor     ax,ax           ; CBW works in some cases
  28.  
  29.         xchg    al,es:[di]
  30.         inc     cx
  31.         jmp     scroll          ; jmp to scroll - 1 for a different look
  32.  
  33. end start
  34.